#pragma once


#include "math/Point.hpp"
#include "math/Vector.hpp"


class Ray
{
public:
    Ray(const Point &origin, const Vector &direction) : _origin(origin), _direction(direction.getNormalized()) {}

    const Point& origin() const { return _origin; }
    const Vector& direction() const { return _direction; }

    Point at(double t) const { return _origin + _direction * t; }

private:
    Point  _origin;           // origin of ray
    Vector _direction;        // direction of ray
};